﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FySystem.Extension
{
    public static class IntExtension
    {
        /// <summary>
        /// 如果为空，用dest中的值替代
        /// </summary>
        /// <param name="source"></param>
        /// <param name="dest"></param>
        /// <returns></returns>
        public static int NVL(this int? source,int dest)
        {
            return source == null ? dest : source.Value;
        }
    }
}
